C (221/301)

From:Jens Granseuer
Date:07 Aug 99 at 16:10:32
Subject:Re: Menus and Hooks

From: Jens Granseuer <jensgr@gmx.net>

Martyn Capewell wrote:
> I now have this code (modified example in the guigfx autodocs):
>
> ULONG __saveds abortdrawfunc(__reg("a0") struct Hook *hook*)
> {
> return(TRUE);
> }
>
> But I still can't initialise the h_Entry field of the Hook structure. If I
> do this:
>
> hook->h_Entry = (HOOKFUNC)abortdrawfunc;
>
[snipped more failed attempts]

> Does anyone know how to obtain a function pointer in VBCC?

The above line should work fine. Could it be that you didn't
declare the function prototype of abortdrawfunc() in the
module you're trying to initialise h_Entry in?

Regards,
Jens